﻿
namespace GoldPrice.Windows.Forms
{
	/// <summary>
	/// This is the abstract edit form for the <see cref="Entities.GoldPriceHtmlContent"/> entity.
	/// </summary>
	/// <remarks>This class is overwritten by .netTiers at each generation.</remarks>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class GoldPriceHtmlContentEditControlBase : System.Windows.Forms.UserControl
	{
		#region Fields
		
		//private System.Windows.Forms.TableLayoutPanel uxTableLayoutPanel;
		/// <summary>
		/// The ErrorProvider for the Entity;
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxErrorProvider;
		
		/// <summary>
		/// The BindingSource for the entity.
		///</summary>
		protected System.Windows.Forms.BindingSource uxBindingSource;
						
		
		/// <summary>
		/// TextBox for the Id property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxId;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Id property.
		/// </summary>
		protected System.Windows.Forms.Label uxIdLabel;
		
		/// <summary>
		/// TextBox for the HtmlContent property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxHtmlContent;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the HtmlContent property.
		/// </summary>
		protected System.Windows.Forms.Label uxHtmlContentLabel;
		
		/// <summary>
		/// DataTimePicker for the PostedDate property.
		/// </summary>
		protected System.Windows.Forms.DateTimePicker uxPostedDate;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the PostedDate property.
		/// </summary>
		protected System.Windows.Forms.Label uxPostedDateLabel;
		
		/// <summary>
		/// TextBox for the Url property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxUrl;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Url property.
		/// </summary>
		protected System.Windows.Forms.Label uxUrlLabel;
		
		/// <summary>
		/// TextBox for the DomainName property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxDomainName;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the DomainName property.
		/// </summary>
		protected System.Windows.Forms.Label uxDomainNameLabel;
		
		/// <summary>
		/// TextBox for the ViewCount property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxViewCount;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ViewCount property.
		/// </summary>
		protected System.Windows.Forms.Label uxViewCountLabel;
		#endregion
		
		#region Main entity
		private Entities.GoldPriceHtmlContent _GoldPriceHtmlContent;
		/// <summary>
		/// Gets or sets the <see cref="Entities.GoldPriceHtmlContent"/> entity to edit with this form.
		/// </summary>
		/// <value>The <see cref="Entities.GoldPriceHtmlContent"/> instance.</value>
		public Entities.GoldPriceHtmlContent GoldPriceHtmlContent
		{
			get {return this._GoldPriceHtmlContent;}
			set
			{
				this._GoldPriceHtmlContent = value;
				if (value != null) 
				{
					this.uxBindingSource.DataSource = value;
					BindControls();
				}			
				
			}
		}
		#endregion
		
		/// <summary>
		/// Binds the controls.
		/// </summary>
		private void BindControls()
		{
			this.uxId.DataBindings.Clear();
			this.uxId.DataBindings.Add("Text", this.uxBindingSource, "Id", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxHtmlContent.DataBindings.Clear();
			this.uxHtmlContent.DataBindings.Add("Text", this.uxBindingSource, "HtmlContent", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxPostedDate.DataBindings.Clear();
			this.uxPostedDate.DataBindings.Add("Value", this.uxBindingSource, "PostedDate", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxUrl.DataBindings.Clear();
			this.uxUrl.DataBindings.Add("Text", this.uxBindingSource, "Url", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxDomainName.DataBindings.Clear();
			this.uxDomainName.DataBindings.Add("Text", this.uxBindingSource, "DomainName", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxViewCount.DataBindings.Clear();
			this.uxViewCount.DataBindings.Add("Text", this.uxBindingSource, "ViewCount", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
		}					
		
		#region Constructor
		
		/// <summary>
		/// Initializes a new instance of the <see cref="GoldPriceHtmlContentEditControlBase"/> class.
		/// </summary>
		public GoldPriceHtmlContentEditControlBase()
		{
			InitializeComponent();			
			
			this.uxBindingSource.CurrentItemChanged += new System.EventHandler(uxBindingSource_currentItemChanged);
		}		
		
		/// <summary>
		/// 
		/// </summary>
		private void uxBindingSource_currentItemChanged(object sender, System.EventArgs e)
		{
			if (_GoldPriceHtmlContent != null) _GoldPriceHtmlContent.Validate();
		}	
				
		/// <summary>
		/// Initializes the component.
		/// </summary>
		public void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.uxErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxBindingSource = new System.Windows.Forms.BindingSource(this.components);
			
			//this.uxTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.uxId = new System.Windows.Forms.TextBox();
			uxIdLabel = new System.Windows.Forms.Label();
			this.uxHtmlContent = new System.Windows.Forms.TextBox();
			uxHtmlContentLabel = new System.Windows.Forms.Label();
			this.uxPostedDate = new System.Windows.Forms.DateTimePicker();
			uxPostedDateLabel = new System.Windows.Forms.Label();
			this.uxUrl = new System.Windows.Forms.TextBox();
			uxUrlLabel = new System.Windows.Forms.Label();
			this.uxDomainName = new System.Windows.Forms.TextBox();
			uxDomainNameLabel = new System.Windows.Forms.Label();
			this.uxViewCount = new System.Windows.Forms.TextBox();
			uxViewCountLabel = new System.Windows.Forms.Label();
			
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).BeginInit();
			this.SuspendLayout();
			
			// 
			// uxTableLayoutPanel
			// 
			//this.uxTableLayoutPanel.AutoSize = true;
			//this.uxTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			//this.uxTableLayoutPanel.ColumnCount = 2;
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
			//this.uxTableLayoutPanel.Location = new System.Drawing.System.Drawing.Point(3, 3);
			//this.uxTableLayoutPanel.Name = "uxTableLayoutPanel";
			//this.uxTableLayoutPanel.RowCount = 2;
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.Size = new System.Drawing.Size(450, 50);
			//this.uxTableLayoutPanel.TabIndex = 0;
			
			//
			// uxErrorProvider
			//
			this.uxErrorProvider.ContainerControl = this;
			this.uxErrorProvider.DataSource = this.uxBindingSource;
			
			//
			// uxIdLabel
			//
			this.uxIdLabel.Name = "uxIdLabel";
			this.uxIdLabel.Text = "Id:";
			this.uxIdLabel.Location = new System.Drawing.Point(3, 0);
			this.Controls.Add(this.uxIdLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdLabel);			
			//
			// uxId
			//
			this.uxId.Name = "uxId";
			//this.uxTableLayoutPanel.Controls.Add(this.uxId);
			this.uxId.Location = new System.Drawing.Point(160, 0);
			this.Controls.Add(this.uxId);
			//
			// uxHtmlContentLabel
			//
			this.uxHtmlContentLabel.Name = "uxHtmlContentLabel";
			this.uxHtmlContentLabel.Text = "Html Content:";
			this.uxHtmlContentLabel.Location = new System.Drawing.Point(3, 26);
			this.Controls.Add(this.uxHtmlContentLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxHtmlContentLabel);			
			//
			// uxHtmlContent
			//
			this.uxHtmlContent.Name = "uxHtmlContent";
			this.uxHtmlContent.Width = 250;
			this.uxHtmlContent.MaxLength = 16;
			//this.uxTableLayoutPanel.Controls.Add(this.uxHtmlContent);
			this.uxHtmlContent.Location = new System.Drawing.Point(160, 26);
			this.Controls.Add(this.uxHtmlContent);
			//
			// uxPostedDateLabel
			//
			this.uxPostedDateLabel.Name = "uxPostedDateLabel";
			this.uxPostedDateLabel.Text = "Posted Date:";
			this.uxPostedDateLabel.Location = new System.Drawing.Point(3, 52);
			this.Controls.Add(this.uxPostedDateLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxPostedDateLabel);			
			//
			// uxPostedDate
			//
			this.uxPostedDate.Name = "uxPostedDate";
			//this.uxTableLayoutPanel.Controls.Add(this.uxPostedDate);
			this.uxPostedDate.Location = new System.Drawing.Point(160, 52);
			this.Controls.Add(this.uxPostedDate);
			//
			// uxUrlLabel
			//
			this.uxUrlLabel.Name = "uxUrlLabel";
			this.uxUrlLabel.Text = "Url:";
			this.uxUrlLabel.Location = new System.Drawing.Point(3, 78);
			this.Controls.Add(this.uxUrlLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxUrlLabel);			
			//
			// uxUrl
			//
			this.uxUrl.Name = "uxUrl";
			this.uxUrl.Width = 250;
			this.uxUrl.MaxLength = 200;
			//this.uxTableLayoutPanel.Controls.Add(this.uxUrl);
			this.uxUrl.Location = new System.Drawing.Point(160, 78);
			this.Controls.Add(this.uxUrl);
			//
			// uxDomainNameLabel
			//
			this.uxDomainNameLabel.Name = "uxDomainNameLabel";
			this.uxDomainNameLabel.Text = "Domain Name:";
			this.uxDomainNameLabel.Location = new System.Drawing.Point(3, 104);
			this.Controls.Add(this.uxDomainNameLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxDomainNameLabel);			
			//
			// uxDomainName
			//
			this.uxDomainName.Name = "uxDomainName";
			this.uxDomainName.Width = 250;
			this.uxDomainName.MaxLength = 50;
			//this.uxTableLayoutPanel.Controls.Add(this.uxDomainName);
			this.uxDomainName.Location = new System.Drawing.Point(160, 104);
			this.Controls.Add(this.uxDomainName);
			//
			// uxViewCountLabel
			//
			this.uxViewCountLabel.Name = "uxViewCountLabel";
			this.uxViewCountLabel.Text = "View Count:";
			this.uxViewCountLabel.Location = new System.Drawing.Point(3, 130);
			this.Controls.Add(this.uxViewCountLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxViewCountLabel);			
			//
			// uxViewCount
			//
			this.uxViewCount.Name = "uxViewCount";
			//this.uxTableLayoutPanel.Controls.Add(this.uxViewCount);
			this.uxViewCount.Location = new System.Drawing.Point(160, 130);
			this.Controls.Add(this.uxViewCount);
			// 
			// GoldPriceHtmlContentEditControlBase
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			//this.Controls.Add(this.uxTableLayoutPanel);
			this.AutoScroll = true;
			this.Name = "GoldPriceHtmlContentEditControlBase";
			this.Size = new System.Drawing.Size(478, 311);
			//this.Localizable = true;
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).EndInit();			
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		#endregion
				
		#region ComboBox List
		
		
		#endregion
		
        #region Field visibility

        /// <summary>
        /// Indicates if the controls associated with the uxId property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxIdVisible
        {
            get { return this.uxId.Visible; }
            set
            {
                this.uxIdLabel.Visible = value;
                this.uxId.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxId property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxIdEnabled
        {
            get { return this.uxId.Enabled; }
            set
            {
                this.uxId.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxHtmlContent property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxHtmlContentVisible
        {
            get { return this.uxHtmlContent.Visible; }
            set
            {
                this.uxHtmlContentLabel.Visible = value;
                this.uxHtmlContent.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxHtmlContent property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxHtmlContentEnabled
        {
            get { return this.uxHtmlContent.Enabled; }
            set
            {
                this.uxHtmlContent.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxPostedDate property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxPostedDateVisible
        {
            get { return this.uxPostedDate.Visible; }
            set
            {
                this.uxPostedDateLabel.Visible = value;
                this.uxPostedDate.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxPostedDate property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxPostedDateEnabled
        {
            get { return this.uxPostedDate.Enabled; }
            set
            {
                this.uxPostedDate.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxUrl property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxUrlVisible
        {
            get { return this.uxUrl.Visible; }
            set
            {
                this.uxUrlLabel.Visible = value;
                this.uxUrl.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxUrl property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxUrlEnabled
        {
            get { return this.uxUrl.Enabled; }
            set
            {
                this.uxUrl.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxDomainName property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxDomainNameVisible
        {
            get { return this.uxDomainName.Visible; }
            set
            {
                this.uxDomainNameLabel.Visible = value;
                this.uxDomainName.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxDomainName property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxDomainNameEnabled
        {
            get { return this.uxDomainName.Enabled; }
            set
            {
                this.uxDomainName.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxViewCount property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxViewCountVisible
        {
            get { return this.uxViewCount.Visible; }
            set
            {
                this.uxViewCountLabel.Visible = value;
                this.uxViewCount.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxViewCount property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxViewCountEnabled
        {
            get { return this.uxViewCount.Enabled; }
            set
            {
                this.uxViewCount.Enabled = value;
            }
        }

        #endregion

		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	}
}
